package com.homelock.filter;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component//被spring容器管理
@Order(1)//如果多个自定义ApplicationRunner，用来标明执行顺序
public class MyApplicationRunner implements ApplicationRunner {
	
	Logger _log = LoggerFactory.getLogger(MyApplicationRunner.class);
	
	@Value("${job_start}")
	private String jobStart;
	
    @Override
    public void run(ApplicationArguments applicationArguments) throws Exception {
        _log.info(String.format("项目启动成功,加载参数------------>%njobStart:%s",jobStart));

    }

}